#ifndef HUMAN_INTERFACE_H
#define HUMAN_INTERFACE_H
#include <opencv2/core.hpp>
#include "classification.h"

#define POSE_COCO_COLORS_RENDER_GPU \
	255.f, 0.f, 85.f, \
	255.f, 0.f, 0.f, \
	255.f, 85.f, 0.f, \
	255.f, 170.f, 0.f, \
	255.f, 255.f, 0.f, \
	170.f, 255.f, 0.f, \
	85.f, 255.f, 0.f, \
	0.f, 255.f, 0.f, \
	0.f, 255.f, 85.f, \
	0.f, 255.f, 170.f, \
	0.f, 255.f, 255.f, \
	0.f, 170.f, 255.f, \
	0.f, 85.f, 255.f, \
	0.f, 0.f, 255.f, \
	255.f, 0.f, 170.f, \
	170.f, 0.f, 255.f, \
	255.f, 0.f, 255.f, \
	85.f, 0.f, 255.f

const std::vector<float> POSE_COCO_COLORS_RENDER{ POSE_COCO_COLORS_RENDER_GPU };
const std::vector<unsigned int> POSE_COCO_PAIRS_RENDER{ 1, 2, 1, 5, 2, 3, 3, 4, 5, 6, 6, 7, 1, 8, 8, 9, 9, 10, 1, 11, 11, 12, 12, 13, 1, 0, 0, 14, 14, 16, 0, 15, 15, 17 };
const unsigned int POSE_MAX_PEOPLE = 96;


cv::Mat getImage(const cv::Mat& im, cv::Size baseSize = cv::Size(656, 368), float* scale = 0);
BlobData* createBlob_local(int num, int channels, int height, int width);
void nms(BlobData* bottom_blob, BlobData* top_blob, float threshold);
void connectBodyPartsCpu(std::vector<float>& poseKeypoints, const float* const heatMapPtr, const float* const peaksPtr,\
	const cv::Size& heatMapSize, const int maxPeaks, const int interMinAboveThreshold,\
	const float interThreshold, const int minSubsetCnt, const float minSubsetScore, const float scaleFactor, std::vector<int>& keypointShape);
void renderPoseKeypointsCpu(cv::Mat& frame, const std::vector<float>& poseKeypoints, std::vector<int> keyshape,\
	const float renderThreshold, float scale, const bool blendOriginalFrame = true);
void releaseBlob_local(BlobData** blob);

#endif